package com.michael.demo.springcloud.alibaba.seata.order.feign;

import com.michael.demo.springcloud.alibaba.seata.order.feign.failback.UserAccountServiceFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * 类功能描述:
 * <pre>
 *   FeignClient Demo
 * </pre>
 *
 * @author Michael
 * @version 1.0
 * @date 2021/03/31 14:34
 */
@FeignClient(
        name = "service-upms",
        fallbackFactory = UserAccountServiceFallbackFactory.class
)
public interface UserAccountService {

    @PostMapping("/account/deduct/{userId}/{money}")
    String deduct(@PathVariable("userId") Long userId, @PathVariable("money") Integer money);
}
